package leetcode_1201_1300;

import java.util.*;

public class LeeCode_1207 {
    public static void main(String[] args) {

    }
    private static boolean uniqueOccurrences(int[] arr) {
        Map<Integer, Integer> map = new HashMap<>();
        for (int i : arr) {
            map.put(i, map.getOrDefault(i, 0) + 1);
        }
        Set<Integer> set = new HashSet<>();
        for (Integer key : map.keySet()) {
            set.add(map.get(key));
        }
        return map.size() == set.size();
    }
}